def get_name(args):
    if args.fine_tune_from != '':
        string = args.fine_tune_from
        if string.endswith('/'):
            string = string[:-1]
        name = 'finetune_' + string.split('/')[-2] + '_' + string.split('/')[-1]
    else:
        name = 'emsize{}nhid{}dropout{:.2f}tied{}'.format(args.emsize, args.nhid, args.dropout, args.tied)
    if args.lr != 20:
        name += 'lr{:.1f}'.format(args.lr)
    if args.model != 'LSTM':
        name += args.model
    return name
